var app = getApp()
var fileData = require('../../utils/data.js');
var req = require('../../utils/reqUtils.js');
Page( {
  data: {
    colors:fileData.getColor(0)
  },
  onLoad: function (options) {
    wx.setNavigationBarColor({
      frontColor: '#ffffff', // 必写项【该字体颜色仅支持 #ffffff 和 #000000 】
      backgroundColor: this.data.colors.topColor, // 传递的颜色值【仅支持有效值为十六进制颜色】
    })
    req.get('/carDetails/getCarDetails.do', {"carId":options.carId}, 1)
    .then(res => {
      this.setData({
       carDetail:res.data
      })
    })
  },
  getLocation:function(){
    wx.navigateTo({
      url:'../location/location'
    })
  },
  bookTap:function(){
    wx.navigateTo({
      url:'../book/book?carId=' + this.data.carDetail.carId
    })
  }
})